#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

int n, m;
int a[4][4];
int b[4][4], c[4][4];
int x[4], y[4];
bool check() {
  rep(i, 0, 3) rep(j, 0, 3) if (a[i][j] != b[i][j]) return false;
  return true;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  rep(i, 0, 3) rep(j, 0, 3) {
    char c;
    cin >> c;
    a[i][j] = c == '-' ? 0 : 1;
  }
  int ans = 17, res = 0;
  rep(s, 0, 0xFFFF) {
    memset(b, 0, sizeof(b));
    rep(i, 0, 3) x[i] = y[i] = 0;
    rep(k, 0, 15) {
      if (s & (1 << k)) {
        int i = k / 4, j = k % 4;
        x[i]++, y[j]++;
        b[i][j] = 1;
      }
    }
    rep(i, 0, 3) rep(j, 0, 3) b[i][j] = (b[i][j] + x[i] + y[j]) % 2;
    if (check()) {
      int now = __builtin_popcount(s);
      if (now < ans) ans = now, res = s;
    }
  }
  cout << ans << endl;
  rep(k, 0, 15) {
    if (res & (1 << k)) {
      int i = k / 4, j = k % 4;
      cout << i + 1 << ' ' << j + 1 << endl;
    }
  }
  return 0;
}